//
//  FirstTableViewCell.m
//  UI_Lesson11.homework
//
//  Created by dllo on 15/11/10.
//  Copyright (c) 2015年 蓝鸥科技. All rights reserved.
//

#import "FirstTableViewCell.h"

@implementation FirstTableViewCell

-(void)dealloc
{
    [_photoImageView release];
    [_label release];
    [super dealloc];
}

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        
      
        
        self.label = [[UILabel alloc] init];
        [self addSubview:_label];
        [_label release
         ];
        
        
        self.photoImageView = [[UIImageView alloc] init];
        [self addSubview:_photoImageView];
        _photoImageView.contentMode = UIViewContentModeScaleAspectFill;
        _photoImageView.clipsToBounds = YES;
        _photoImageView.layer.cornerRadius = 40;
        [_photoImageView release];
        
        
        
        
    }
    return self;
    
}

-(void)layoutSubviews
{
    
    [super layoutSubviews];
    CGFloat width = self.frame.size.width/3;
    CGFloat height = self.frame.size.height;
    
    self.photoImageView.frame = CGRectMake(10, 10, 80, 80);
    self.label.frame = CGRectMake(width+20, height/3, width, height/2);
    
    
    
    
    
}


@end
